package com.ysd.lis.mapper;

import com.github.yulichang.base.MPJBaseMapper;
import com.ysd.common.dto.ColumnAndCommentDto;
import com.ysd.common.sqlbuilder.TransmitSqlBuilder;
import com.ysd.lis.entity.WkCalcElement;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 试卷列表 Mapper 接口
 * </p>
 *
 * @author LiuQi
 * @since 2024-04-19
 */
public interface WkCalcElementMapper extends MPJBaseMapper<WkCalcElement> {


    /**
     * 根据数据库名称查询数据表
     *
     * @param dataBaseName
     * @return
     */
    @SelectProvider(type = TransmitSqlBuilder.class, method = "buildSelectDataBaseTables")
    List<Map<String, String>> findTableNamesByDataBase(@Param("dataBaseName") String dataBaseName);

    /**
     * 查询表字段
     *
     * @param tableName
     * @return
     */
    @SelectProvider(type = TransmitSqlBuilder.class, method = "buildSelectColumnsByTableName")
    List<ColumnAndCommentDto> findColumnsByTableName(@Param("tableName") String tableName);

}
